
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
     <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <style>
      .radio-inline input[type=radio] {
    margin-top: 4px;
}
        .note-editable{height: 150px}
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">采购订单</h2>
    </div>
    <!-- 标题 -->
    <div>
    <form action=""  class="form-inline">
      <table class="row-margin-top tab-content table-bordered table" border="1" style="margin-bottom:0">
          <tr>
            <td style="min-width: 160px;width: 160px" class="text-center"><label for="" class="form-label">申请人：</label></td>
            <td>测试经理</td>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">申请人部门</label></td>
            <td>华南大区</td>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">申请日期</label></td>
            <td>2017-11-22</td>
            </tr>
            <tr>
            <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">供应商<span class="colorRed">*</span>：</label></td>
            <td colspan="3">
                <div class="form-group">
                   <input type="text" class="form-control" name="" id="gys"><a href="javascript:;" class="changeGys">选择</a><span class="helpText">帮</span>
                </div>
            </td>
             <td  style="min-width: 160px;width: 160px"  class="text-center"><label for="">物料类型<span class="colorRed">*</span>:</label></td>
            <td>
                <select name="wlKind" id="wlKind" class="form-control">
                    <option value="0">请选择</option>
                </select>
                <span class="helpText">帮</span>
            </td>
        </tr>
        <tr>
             <td style="min-width: 160px;width: 160px" class="text-center">
                <label for="" class="form-label">供应商信息<span class="colorRed">*</span>：</label>
             </td>
             <td colspan="5">
                <div class="form-group">
                     <label for="" class="form-label">地址：</label>
                     <input type="text" class="form-control" name="" id="gysAddr">;
                </div>
                  <div class="form-group">
                     <label for="" class="form-label">联系人：</label>
                     <input type="text" class="form-control" name="" id="concact">;
                </div>
                <div class="form-group">
                     <label for="" class="form-label">电话：</label>
                     <input type="text" class="form-control" name="" id="tell">;
                </div>
                   <div class="form-group">
                     <label for="" class="form-label">传真：</label>
                     <input type="text" class="form-control" name="">;
                </div>
                <button class="btn btn-info" type="button">保存</button>
                <!-- <button class="btn btn-info"  type="button">更换收货信息</button> -->
             </td>
        </tr>
        <tr>
           <td style="min-width: 160px;width: 160px" class="text-center">
                <label for="" class="form-label">主题(采购原因)<span class="colorRed">*</span>：</label>
             </td>
             <td colspan="5"><input type="text" class="form-control" name="" id="them"></td>
        </tr>
      </table>
      <table class="table table-bordered">
         <tr>
           <td>
             <button class="btn btn-info" type="button" id="addPO">添加明细</button>（至少添加一条物料明细）
           </td>
        </tr>
      </table>
   <table class="table-bordered table" style="margin:1px 0">
        <tr>
            <td style="min-width: 160px;width: 160px" class="text-center">
                交货信息<span class="colorRed">*</span>
            </td>
            <td>
                    交货地址：<input type="text" class="form-control" name="" id="jhAddr">;
              
                    联系人：<input type="text" class="form-control" name="" id="jhConcact">;
               
                    电话：<input type="text" class="form-control" name="" id="jhTell">;
               
                    传真：<input type="text" class="form-control" name="" id="">;
                </div>
            </td>
        </tr>
        <tr>
             <td style="min-width: 160px;width: 160px" class="text-center">
                供应条例<span class="colorRed">*</span>：
            </td>  
            <td>
                  <div class="ibox float-e-margins" style="margin-bottom: 0">
                    <div class="ibox-content no-padding">

                        <div class="summernote">
                           
                        </div>

                    </div>
                </div>

            </td>
        </tr>
        <tr>
          <td colspan="2">温馨提醒：本编辑器不支持复杂表单提交，复杂表单请以附件形式提交。</td>
        </tr>
        <tr>
              <td style="min-width: 160px;width: 160px" class="text-center">
                备注：
            </td> 
            <td>
                <textarea name="" id="" style="width: 70%;height: 70px;user-select:none" class="form-control"></textarea><span style="vertical-align: bottom;">500</span>
            </td>
        </tr>
   </table>
    <div class="form-group" style="margin:20px 10px 20px 20px">
        <input type="file" id="exampleInputFile">
        <p class="help-block" style="color:#1295d2">注：最多上传15个文件，每个文件小于50M,支持格式：</p>
        <p class="help-block" style="color:#1295d2">jpg,bnp,gif,png,jpeg,tif,raw,doc,docx,xls,xlsx,ppt,pptx,txt,pdf,rar,zip,mp4,avi,rmvb,rm,mid,3gp,AVI,3GP,,mpg,mp3,wma,wav</p>
    </div>
     <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0">
        <input type="button" class="btn btn-success" id="saveCao" value="保存为草稿">
        <input type="button" class="btn btn-info" id="saveUp" value="保存并提交工作流">
        <input type="button" class="btn btn-warning" value="返回" onclick="back()">
    </div>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!-- <script src="js/plugins/layer/laydate/laydate.js"></script> -->
      <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/summernote/summernote.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/summernote/summernote-zh-CN.js"></script>
      <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>

   <script>
        function back(){
            history.go(-1)
        }

        $(document).ready(function(){
              $('.summernote').summernote({
                lang: 'zh-CN'
            });

        })
     $(".changeGys").click(function(){
          layer.open({
           type: 2,
            skin: 'layui-layer-rim', //加上边框
           area: ['800px', '500px'], //宽高
           title:"",
           content: 'gys_list.html'
       });
    })
     $("#addPO").click(function(){
            if($("#gys").val()==""){
                swal("","供应商不能为空！","error")
            }else if($("#wlKind").val()==""){
                 swal("","物料类别不能为空！","error")
            }else if($("#gysAddr").val()==""){
                 swal("","供应商地址不能为空！","error")
            }else if($("#concact").val()==""){
                 swal("","联系人不能为空！","error")
            }else if($("#tell").val()==""){
                 swal("","电话不能为空！","error")
            }else if($("#them").val()==""){
                 swal("","主题(采购原因)不能为空！","error")
            }else{
                 layer.open({
                 type: 2,
                skin: 'layui-layer-rim', //加上边框
                area: ['800px', '500px'], //宽高
                title:"新增采购明细",
                content: 'PO_add_alert.html'
              }); 
            }
     })

     $("#saveUp").click(function(){
        if($("#gys").val()==""){
             swal("","请至少添加一条物料明细！","error")
        }else if($("#jhAddr").val()==""){
             swal("","交货地址不能为空！","error")
        }else if($("#jhConcact").val()==""){
             swal("","联系人不能为空！","error")
        }else if($("#jhTell").val()==""){
             swal("","电话不能为空！","error")
        }else if($(".note-editable").html()==""){
            swal("","供应条例不能为空！","error")
        }else{

        }
     });
     $("#saveCao").click(function(){
        if($("#gys").val()==""){
             swal("","请至少添加一条物料明细！","error")
        }else if($("#jhAddr").val()==""){
             swal("","交货地址不能为空！","error")
        }else if($("#jhConcact").val()==""){
             swal("","联系人不能为空！","error")
        }else if($(".note-editable").html()==""){
            swal("","供应条例不能为空！","error")
        }else{
            
        }
     })
   </script>
</body>

</html>
